package lesson_two;

/**
 * @author LvHengChang
 * version 1.0
 * @description:
 */

public class Dog {
    public int weightInPounds; // 0
    public static String binomen = "Canis familiaris";

    public Dog(int weightInPounds) {
        this.weightInPounds = weightInPounds;
    }

    public Dog() {
    }

    public static Dog maxDog(Dog d1, Dog d2) {
        if (d1.weightInPounds > d2.weightInPounds) {
            return d1;
        }
        return d2;
    }

    public void makeNoise() {
        if (weightInPounds < 10) {
            System.out.println("yip!");
        } else if (weightInPounds < 30) {
            System.out.println("bark!");
        } else {
            System.out.println("woof!");
        }
    }

    public Dog maxDog(Dog d2) {
        if (this.weightInPounds > d2.weightInPounds) {
            return this;
        }
        return d2;
    }
}
